package fr.ece.ing4.inf442.cours2;

public class DemoJoin {
	public static void main(String[] args) throws InterruptedException {
		Thread myThread = new Thread() {
			@Override
			public void run() {
				for (int i = 0; i < 5; i++) {
					System.out.println(i + ": Hello world !");
					try {
						Thread.sleep(1000);
					} catch (InterruptedException e) {
					}
				}
			}
		};
		myThread.start();
		myThread.join();
		System.out.println("Done !");
	}
}
